onmessage = ({ data }) => {
  type unaryOp = 'BitwiseNOT' | 'UnaryNegation' | 'Termial' | 'SquareRoot' | 'CubeRoot'
  type binaryOp =
    | 'Addition'
    | 'Subtraction'
    | 'Multiplication'
    | 'Division'
    | 'Remainder'
    | 'Exponentiation'
    | 'BitwiseLeftShift'
    | 'BitwiseRightShift'
    | 'BitwiseUnsignedRightShift'
    | 'BitwiseAND'
    | 'BitwiseXOR'
    | 'BitwiseOR'
  type op = unaryOp | binaryOp
  type back = op | undefined
  type node = { val: number; path: string; back: back }
  const needKT: {
    [index in binaryOp]: { op1: back[]; op2: back[] }
  } = {
    Addition: {
      op1: [
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ],
      op2: [
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    Subtraction: {
      op1: [
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ],
      op2: [
        'Addition',
        'Subtraction',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    Multiplication: {
      op1: [
        'Addition',
        'Subtraction',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ],
      op2: [
        'Addition',
        'Subtraction',
        'Remainder',
        'Division',
        'Multiplication',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    Division: {
      op1: [
        'Addition',
        'Subtraction',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ],
      op2: [
        'Addition',
        'Subtraction',
        'Multiplication',
        'Division',
        'Remainder',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    Remainder: {
      op1: [
        'Addition',
        'Subtraction',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ],
      op2: [
        'Addition',
        'Subtraction',
        'Multiplication',
        'Division',
        'Remainder',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    Exponentiation: {
      op1: [
        'Addition',
        'Subtraction',
        'Multiplication',
        'Division',
        'UnaryNegation',
        'Remainder',
        'Exponentiation',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR',
        'BitwiseNOT'
      ],
      op2: [
        'Addition',
        'Subtraction',
        'Multiplication',
        'Division',
        'Remainder',
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    BitwiseLeftShift: {
      op1: ['BitwiseAND', 'BitwiseXOR', 'BitwiseOR'],
      op2: [
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    BitwiseRightShift: {
      op1: ['BitwiseAND', 'BitwiseXOR', 'BitwiseOR'],
      op2: [
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    BitwiseUnsignedRightShift: {
      op1: ['BitwiseAND', 'BitwiseXOR', 'BitwiseOR'],
      op2: [
        'BitwiseLeftShift',
        'BitwiseRightShift',
        'BitwiseUnsignedRightShift',
        'BitwiseAND',
        'BitwiseXOR',
        'BitwiseOR'
      ]
    },
    BitwiseAND: {
      op1: ['BitwiseXOR', 'BitwiseOR'],
      op2: ['BitwiseAND', 'BitwiseXOR', 'BitwiseOR']
    },
    BitwiseXOR: {
      op1: ['BitwiseOR'],
      op2: ['BitwiseXOR', 'BitwiseOR']
    },
    BitwiseOR: {
      op1: [],
      op2: ['BitwiseOR']
    }
  }
  function judgePoint24(cards: node[], target: number, epsilon = 6e-21) {
    function calcTermial(n: number) {
      return (n * (n + 1)) / 2
    }
    function bkt1(val: node, includes: (typeof val.back)[]) {
      return includes.includes(val.back) ? `(${val.path})` : val.path
    }
    function* dfs(nums: node[]): Generator<string, undefined, undefined> {
      if (nums.length === 1) {
        if (Math.abs(nums[0].val - target) < epsilon) yield nums[0].path
        return
      }
      for (let i = 0; i < nums.length; i++) {
        for (let j = i + 1; j < nums.length; j++) {
          const num1 = nums[i]
          const num2 = nums[j]
          const arrWithoutNums = nums.filter((_, index) => index !== i && index !== j)
          // +
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val + num2.val,
              path: `${bkt1(num1, needKT.Addition.op1)} + ${bkt1(num2, needKT.Addition.op2)}`,
              back: 'Addition'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val - num2.val,
              path: `${bkt1(num1, needKT.Subtraction.op1)} - ${bkt1(num2, needKT.Subtraction.op2)}`,
              back: 'Subtraction'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num2.val - num1.val,
              path: `${bkt1(num2, needKT.Subtraction.op1)} - ${bkt1(num1, needKT.Subtraction.op2)}`,
              back: 'Subtraction'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val * num2.val,
              path: `${bkt1(num1, needKT.Multiplication.op1)} * ${bkt1(
                num2,
                needKT.Multiplication.op2
              )}`,
              back: 'Multiplication'
            }
          ])
          if (num2.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: num1.val / num2.val,
                path: `${bkt1(num1, needKT.Division.op1)} / ${bkt1(num2, needKT.Division.op2)}`,
                back: 'Division'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: num1.val % num2.val,
                path: `${bkt1(num1, needKT.Remainder.op1)} % ${bkt1(num2, needKT.Remainder.op2)}`,
                back: 'Remainder'
              }
            ])
          }
          if (num1.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: num2.val / num1.val,
                path: `${bkt1(num2, needKT.Division.op1)} / ${bkt1(num1, needKT.Division.op2)}`,
                back: 'Division'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: num2.val % num1.val,
                path: `${bkt1(num2, needKT.Remainder.op1)} % ${bkt1(num1, needKT.Remainder.op2)}`,
                back: 'Remainder'
              }
            ])
          }
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val ** num2.val,
              path: `${bkt1(num1, needKT.Exponentiation.op1)} ^ ${bkt1(
                num2,
                needKT.Exponentiation.op2
              )}`,
              back: 'Exponentiation'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num2.val ** num1.val,
              path: `${bkt1(num2, needKT.Exponentiation.op1)} ^ ${bkt1(
                num1,
                needKT.Exponentiation.op2
              )}`,
              back: 'Exponentiation'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val << num2.val,
              path: `${bkt1(num1, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num2,
                needKT.BitwiseLeftShift.op2
              )}`,
              back: 'BitwiseLeftShift'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num2.val << num1.val,
              path: `${bkt1(num2, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num1,
                needKT.BitwiseLeftShift.op2
              )}`,
              back: 'BitwiseLeftShift'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val >> num2.val,
              path: `${bkt1(num1, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num2,
                needKT.BitwiseRightShift.op2
              )}`,
              back: 'BitwiseRightShift'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num2.val >> num1.val,
              path: `${bkt1(num2, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num1,
                needKT.BitwiseRightShift.op2
              )}`,
              back: 'BitwiseRightShift'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val >>> num2.val,
              path: `${bkt1(num1, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num2,
                needKT.BitwiseUnsignedRightShift.op2
              )}`,
              back: 'BitwiseUnsignedRightShift'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num2.val >>> num1.val,
              path: `${bkt1(num2, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num1,
                needKT.BitwiseUnsignedRightShift.op2
              )}`,
              back: 'BitwiseUnsignedRightShift'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val & num2.val,
              path: `${bkt1(num1, needKT.BitwiseAND.op1)} & ${bkt1(num2, needKT.BitwiseAND.op2)}`,
              back: 'BitwiseAND'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val ^ num2.val,
              path: `${bkt1(num1, needKT.BitwiseXOR.op1)} ^| ${bkt1(num2, needKT.BitwiseXOR.op2)}`,
              back: 'BitwiseXOR'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: num1.val | num2.val,
              path: `${bkt1(num1, needKT.BitwiseOR.op1)} | ${bkt1(num2, needKT.BitwiseOR.op2)}`,
              back: 'BitwiseOR'
            }
          ])

          // ~
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val + num2.val),
              path: `~(${bkt1(num1, needKT.Addition.op1)} + ${bkt1(num2, needKT.Addition.op2)})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val - num2.val),
              path: `~(${bkt1(num1, needKT.Subtraction.op1)} - ${bkt1(
                num2,
                needKT.Subtraction.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num2.val - num1.val),
              path: `~(${bkt1(num2, needKT.Subtraction.op1)} - ${bkt1(
                num1,
                needKT.Subtraction.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val * num2.val),
              path: `~(${bkt1(num1, needKT.Multiplication.op1)} * ${bkt1(
                num2,
                needKT.Multiplication.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          if (num2.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: ~(num1.val / num2.val),
                path: `~(${bkt1(num1, needKT.Division.op1)} / ${bkt1(num2, needKT.Division.op2)})`,
                back: 'BitwiseNOT'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: ~(num1.val % num2.val),
                path: `~(${bkt1(num1, needKT.Remainder.op1)} % ${bkt1(
                  num2,
                  needKT.Remainder.op2
                )})`,
                back: 'BitwiseNOT'
              }
            ])
          }
          if (num1.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: ~(num2.val / num1.val),
                path: `~(${bkt1(num2, needKT.Division.op1)} / ${bkt1(num1, needKT.Division.op2)})`,
                back: 'BitwiseNOT'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: ~(num2.val % num1.val),
                path: `~(${bkt1(num2, needKT.Remainder.op1)} % ${bkt1(
                  num1,
                  needKT.Remainder.op2
                )})`,
                back: 'BitwiseNOT'
              }
            ])
          }
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val ** num2.val),
              path: `~(${bkt1(num1, needKT.Exponentiation.op1)} ^ ${bkt1(
                num2,
                needKT.Exponentiation.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num2.val ** num1.val),
              path: `~(${bkt1(num2, needKT.Exponentiation.op1)} ^ ${bkt1(
                num1,
                needKT.Exponentiation.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val << num2.val),
              path: `~(${bkt1(num1, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num2,
                needKT.BitwiseLeftShift.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num2.val << num1.val),
              path: `~(${bkt1(num2, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num1,
                needKT.BitwiseLeftShift.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val >> num2.val),
              path: `~(${bkt1(num1, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num2,
                needKT.BitwiseRightShift.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num2.val >> num1.val),
              path: `~(${bkt1(num2, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num1,
                needKT.BitwiseRightShift.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val >>> num2.val),
              path: `~(${bkt1(num1, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num2,
                needKT.BitwiseUnsignedRightShift.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num2.val >>> num1.val),
              path: `~(${bkt1(num2, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num1,
                needKT.BitwiseUnsignedRightShift.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val & num2.val),
              path: `~(${bkt1(num1, needKT.BitwiseAND.op1)} & ${bkt1(
                num2,
                needKT.BitwiseAND.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val ^ num2.val),
              path: `~(${bkt1(num1, needKT.BitwiseXOR.op1)} ^| ${bkt1(
                num2,
                needKT.BitwiseXOR.op2
              )})`,
              back: 'BitwiseNOT'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: ~(num1.val | num2.val),
              path: `~(${bkt1(num1, needKT.BitwiseOR.op1)} | ${bkt1(num2, needKT.BitwiseOR.op2)})`,
              back: 'BitwiseNOT'
            }
          ])

          // ?
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val + num2.val),
              path: `(${bkt1(num1, needKT.Addition.op1)} + ${bkt1(num2, needKT.Addition.op2)})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val - num2.val),
              path: `(${bkt1(num1, needKT.Subtraction.op1)} - ${bkt1(
                num2,
                needKT.Subtraction.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num2.val - num1.val),
              path: `(${bkt1(num2, needKT.Subtraction.op1)} - ${bkt1(
                num1,
                needKT.Subtraction.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val * num2.val),
              path: `(${bkt1(num1, needKT.Multiplication.op1)} * ${bkt1(
                num2,
                needKT.Multiplication.op2
              )})?`,
              back: 'Termial'
            }
          ])
          if (num2.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: calcTermial(num1.val / num2.val),
                path: `(${bkt1(num1, needKT.Division.op1)} / ${bkt1(num2, needKT.Division.op2)})?`,
                back: 'Termial'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: calcTermial(num1.val % num2.val),
                path: `(${bkt1(num1, needKT.Remainder.op1)} % ${bkt1(
                  num2,
                  needKT.Remainder.op2
                )})?`,
                back: 'Termial'
              }
            ])
          }
          if (num1.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: calcTermial(num2.val / num1.val),
                path: `(${bkt1(num2, needKT.Division.op1)} / ${bkt1(num1, needKT.Division.op2)})?`,
                back: 'Termial'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: calcTermial(num2.val % num1.val),
                path: `(${bkt1(num2, needKT.Remainder.op1)} % ${bkt1(
                  num1,
                  needKT.Remainder.op2
                )})?`,
                back: 'Termial'
              }
            ])
          }
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val ** num2.val),
              path: `(${bkt1(num1, needKT.Exponentiation.op1)} ^ ${bkt1(
                num2,
                needKT.Exponentiation.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num2.val ** num1.val),
              path: `(${bkt1(num2, needKT.Exponentiation.op1)} ^ ${bkt1(
                num1,
                needKT.Exponentiation.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val << num2.val),
              path: `(${bkt1(num1, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num2,
                needKT.BitwiseLeftShift.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num2.val << num1.val),
              path: `(${bkt1(num2, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num1,
                needKT.BitwiseLeftShift.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val >> num2.val),
              path: `(${bkt1(num1, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num2,
                needKT.BitwiseRightShift.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num2.val >> num1.val),
              path: `(${bkt1(num2, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num1,
                needKT.BitwiseRightShift.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val >>> num2.val),
              path: `(${bkt1(num1, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num2,
                needKT.BitwiseUnsignedRightShift.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num2.val >>> num1.val),
              path: `(${bkt1(num2, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num1,
                needKT.BitwiseUnsignedRightShift.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val & num2.val),
              path: `(${bkt1(num1, needKT.BitwiseAND.op1)} & ${bkt1(
                num2,
                needKT.BitwiseAND.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val ^ num2.val),
              path: `(${bkt1(num1, needKT.BitwiseXOR.op1)} ^| ${bkt1(
                num2,
                needKT.BitwiseXOR.op2
              )})?`,
              back: 'Termial'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: calcTermial(num1.val | num2.val),
              path: `(${bkt1(num1, needKT.BitwiseOR.op1)} | ${bkt1(num2, needKT.BitwiseOR.op2)})?`,
              back: 'Termial'
            }
          ])

          // √
          let t = num1.val + num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.Addition.op1)} + ${bkt1(num2, needKT.Addition.op2)})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val - num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.Subtraction.op1)} - ${bkt1(
                  num2,
                  needKT.Subtraction.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num2.val - num1.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num2, needKT.Subtraction.op1)} - ${bkt1(
                  num1,
                  needKT.Subtraction.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val * num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.Multiplication.op1)} * ${bkt1(
                  num2,
                  needKT.Multiplication.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          if (num2.val) {
            t = num1.val / num2.val
            if (t >= 0)
              yield* dfs([
                ...arrWithoutNums,
                {
                  val: Math.sqrt(t),
                  path: `√(${bkt1(num1, needKT.Division.op1)} / ${bkt1(
                    num2,
                    needKT.Division.op2
                  )})`,
                  back: 'SquareRoot'
                }
              ])
            t = num1.val % num2.val
            if (t >= 0)
              yield* dfs([
                ...arrWithoutNums,
                {
                  val: Math.sqrt(t),
                  path: `√(${bkt1(num1, needKT.Remainder.op1)} % ${bkt1(
                    num2,
                    needKT.Remainder.op2
                  )})`,
                  back: 'SquareRoot'
                }
              ])
          }
          if (num1.val) {
            t = num2.val / num1.val
            if (t >= 0)
              yield* dfs([
                ...arrWithoutNums,
                {
                  val: Math.sqrt(t),
                  path: `√(${bkt1(num2, needKT.Division.op1)} / ${bkt1(
                    num1,
                    needKT.Division.op2
                  )})`,
                  back: 'SquareRoot'
                }
              ])
            t = num2.val % num1.val
            if (t >= 0)
              yield* dfs([
                ...arrWithoutNums,
                {
                  val: Math.sqrt(t),
                  path: `√(${bkt1(num2, needKT.Remainder.op1)} % ${bkt1(
                    num1,
                    needKT.Remainder.op2
                  )})`,
                  back: 'SquareRoot'
                }
              ])
          }
          t = num1.val ** num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.Exponentiation.op1)} ^ ${bkt1(
                  num2,
                  needKT.Exponentiation.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num2.val ** num1.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num2, needKT.Exponentiation.op1)} ^ ${bkt1(
                  num1,
                  needKT.Exponentiation.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val << num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                  num2,
                  needKT.BitwiseLeftShift.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num2.val << num1.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num2, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                  num1,
                  needKT.BitwiseLeftShift.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val >> num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                  num2,
                  needKT.BitwiseRightShift.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num2.val >> num1.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num2, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                  num1,
                  needKT.BitwiseRightShift.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val >>> num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                  num2,
                  needKT.BitwiseUnsignedRightShift.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num2.val >>> num1.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num2, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                  num1,
                  needKT.BitwiseUnsignedRightShift.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val & num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.BitwiseAND.op1)} & ${bkt1(
                  num2,
                  needKT.BitwiseAND.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val ^ num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.BitwiseXOR.op1)} ^| ${bkt1(
                  num2,
                  needKT.BitwiseXOR.op2
                )})`,
                back: 'SquareRoot'
              }
            ])
          t = num1.val | num2.val
          if (t >= 0)
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.sqrt(t),
                path: `√(${bkt1(num1, needKT.BitwiseOR.op1)} | ${bkt1(
                  num2,
                  needKT.BitwiseOR.op2
                )})`,
                back: 'SquareRoot'
              }
            ])

          // ∛
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val + num2.val),
              path: `∛(${bkt1(num1, needKT.Addition.op1)} + ${bkt1(num2, needKT.Addition.op2)})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val - num2.val),
              path: `∛(${bkt1(num1, needKT.Subtraction.op1)} - ${bkt1(
                num2,
                needKT.Subtraction.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num2.val - num1.val),
              path: `∛(${bkt1(num2, needKT.Subtraction.op1)} - ${bkt1(
                num1,
                needKT.Subtraction.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val * num2.val),
              path: `∛(${bkt1(num1, needKT.Multiplication.op1)} * ${bkt1(
                num2,
                needKT.Multiplication.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          if (num2.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.cbrt(num1.val / num2.val),
                path: `∛(${bkt1(num1, needKT.Division.op1)} / ${bkt1(num2, needKT.Division.op2)})`,
                back: 'CubeRoot'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.cbrt(num1.val % num2.val),
                path: `∛(${bkt1(num1, needKT.Remainder.op1)} % ${bkt1(
                  num2,
                  needKT.Remainder.op2
                )})`,
                back: 'CubeRoot'
              }
            ])
          }
          if (num1.val) {
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.cbrt(num2.val / num1.val),
                path: `∛(${bkt1(num2, needKT.Division.op1)} / ${bkt1(num1, needKT.Division.op2)})`,
                back: 'CubeRoot'
              }
            ])
            yield* dfs([
              ...arrWithoutNums,
              {
                val: Math.cbrt(num2.val % num1.val),
                path: `∛(${bkt1(num2, needKT.Remainder.op1)} % ${bkt1(
                  num1,
                  needKT.Remainder.op2
                )})`,
                back: 'CubeRoot'
              }
            ])
          }
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val ** num2.val),
              path: `∛(${bkt1(num1, needKT.Exponentiation.op1)} ^ ${bkt1(
                num2,
                needKT.Exponentiation.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num2.val ** num1.val),
              path: `∛(${bkt1(num2, needKT.Exponentiation.op1)} ^ ${bkt1(
                num1,
                needKT.Exponentiation.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val << num2.val),
              path: `∛(${bkt1(num1, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num2,
                needKT.BitwiseLeftShift.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num2.val << num1.val),
              path: `∛(${bkt1(num2, needKT.BitwiseLeftShift.op1)} << ${bkt1(
                num1,
                needKT.BitwiseLeftShift.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val >> num2.val),
              path: `∛(${bkt1(num1, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num2,
                needKT.BitwiseRightShift.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num2.val >> num1.val),
              path: `∛(${bkt1(num2, needKT.BitwiseRightShift.op1)} >> ${bkt1(
                num1,
                needKT.BitwiseRightShift.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val >>> num2.val),
              path: `∛(${bkt1(num1, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num2,
                needKT.BitwiseUnsignedRightShift.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num2.val >>> num1.val),
              path: `∛(${bkt1(num2, needKT.BitwiseUnsignedRightShift.op1)} >>> ${bkt1(
                num1,
                needKT.BitwiseUnsignedRightShift.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val & num2.val),
              path: `∛(${bkt1(num1, needKT.BitwiseAND.op1)} & ${bkt1(
                num2,
                needKT.BitwiseAND.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val ^ num2.val),
              path: `∛(${bkt1(num1, needKT.BitwiseXOR.op1)} ^| ${bkt1(
                num2,
                needKT.BitwiseXOR.op2
              )})`,
              back: 'CubeRoot'
            }
          ])
          yield* dfs([
            ...arrWithoutNums,
            {
              val: Math.cbrt(num1.val | num2.val),
              path: `∛(${bkt1(num1, needKT.BitwiseOR.op1)} | ${bkt1(num2, needKT.BitwiseOR.op2)})`,
              back: 'CubeRoot'
            }
          ])
        }
      }
      return
    }
    return dfs(cards)
  }
  for (const i of judgePoint24(data.numbers, data.target, data.epsilon))
    postMessage({ value: i, done: false })
  postMessage({ value: undefined, done: true })
  close()
}
